package net.lzzy.practices.repositories;

import net.lzzy.practices.entities.Applicant;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.UUID;

/**
 * @author AndyStern
 */
public interface ApplicantRepository extends JpaRepository<Applicant, UUID> {
    List<Applicant> findApplicantsByStudentIdEqualsOrderByApplyTimeDesc(UUID id);
    List<Applicant> findApplicantsByStudentIdEqualsAndStatusEqualsOrderByApplyTimeDesc(UUID id,int status);
    List<Applicant> findApplicantsByCourseIdEqualsAndStatusEqualsOrderByApplyTimeDesc(UUID id,int status);
    Applicant findApplicantByCourseIdAndStudentId(UUID courseId, UUID studentId);
}
